home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / gport101.zip / GPORT.DOC < prev    next >
Text File  |  1991-08-31  |  25KB  |  1,117 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                     Gport
  12.  
  13.                     C Language Game Port Library
  14.  
  15.                     Version 1.01
  16.  
  17.                     1 September 91
  18.  
  19.                     Copyright (c) 1991  Bri Productions
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.                                         1
  63.  
  64.  
  65.  
  66.         Table of Contents
  67.  
  68.  
  69.             Introduction
  70.  
  71.                     General Description.....................3
  72.  
  73.                     Disclaimer..............................3
  74.  
  75.                     Registration............................3
  76.  
  77.                     Contacting the Author...................3
  78.  
  79.                     A typedef...............................3
  80.  
  81.  
  82.             General Functions
  83.  
  84.                     Description.............................4
  85.  
  86.                     GamOpen.................................5
  87.  
  88.                     GamClose................................6
  89.  
  90.                     GamAxis.................................6
  91.  
  92.                     GamAxes.................................7
  93.  
  94.                     GamButton...............................8
  95.  
  96.  
  97.             Calibration Functions
  98.  
  99.                     Description............................10
  100.  
  101.                     GamRawAxis.............................11
  102.  
  103.                     GamCalAxis.............................12
  104.  
  105.                     GamCenter..............................13
  106.  
  107.  
  108.  
  109.             Appendix A - Things to Look Out For............15
  110.  
  111.             Appendix B - Joystick Calibration/Centering....16
  112.  
  113.             Appendix C - Registration Form.................18
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.                                         2
  125.  
  126.  
  127.  
  128.         General Description.
  129.  
  130.         Gport is a C language, high speed, high resolution game port
  131.         library for IBM and compatible computers. Gport is compatible
  132.         with most if not all DOS based C compilers.
  133.  
  134.  
  135.         Some of Gport's features are:
  136.  
  137.         ∙ Timer driven button monitor.
  138.         ∙ Optional joystick calibration.
  139.         ∙ Choice of REAL or MEAN centering modes.
  140.         ∙ Yields higher resolution on faster computers.
  141.         ∙ Constant axis scaling to approximately ±1000.
  142.         ∙ Written in assembly language for optimum speed and efficiency.
  143.  
  144.  
  145.         DISCLAIMER.
  146.  
  147.         Gport is provided AS IS. Bri Productions specifically disclaims
  148.         any and all warranties, expressed or implied, including fitness
  149.         for a particular purpose. Use this product at your own risk.
  150.  
  151.  
  152.         Registration.
  153.  
  154.         Gport is a user supported software product. Distribution of
  155.         this product, unaltered and without charge, is encouraged. If
  156.         you find this product useful, you are encouraged to register
  157.         your copy. This allows Bri Productions to continue to provide
  158.         and support low cost, high quality shareware.
  159.  
  160.         The registration fee is $15.00 US dollars and includes libraries
  161.         for small, medium, compact and large memory models and complete
  162.         source code. A registration form is provided in Appendix C.
  163.  
  164.  
  165.         Contacting the author.
  166.  
  167.         Bri Productions may be contacted by any of the following means:
  168.  
  169.         CompuServe      -       76635,2246
  170.         U.S. mail       -       Bri Productions
  171.                                 P.O.Box 7121
  172.                                 Fremont, CA 94537-7121
  173.  
  174.         CompuServe is a trademark of CompuServe Inc.
  175.  
  176.  
  177.         A typedef.
  178.  
  179.         You will see the data type 'byte' throughout the Gport library.
  180.         This is a typedef defined in gport.h. Byte is an unsigned
  181.         character used for byte size values.
  182.  
  183.  
  184.  
  185.  
  186.                                         3
  187.  
  188.  
  189.  
  190.         General functions
  191.  
  192.         There are two functions that are required before other game
  193.         port functions can be called. They are GamOpen() and GamClose().
  194.         GamOpen() initializes the game port and installs an interrupt
  195.         handler for monitoring the buttons. GamClose() releases the
  196.         interrupt handler. Failing to call GamClose() prior to the
  197.         program's termination will most certainly cause an operating
  198.         system crash.
  199.  
  200.         GamAxis() and GamAxes() fetches the position(s) of one or
  201.         more joystick axes. A full up or right joystick returns a value
  202.         of approximately +1000 and full down or left returns a value of
  203.         approximately -1000. GamButton() fetches the status of the game
  204.         port's buttons. Information on a button pressed since the last
  205.         call to GamButton() as well as a presently pressed is available.
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.                                         4
  249.  
  250.  
  251.  
  252.         ----------------------------------------------------------------
  253.         GamOpen
  254.         ----------------------------------------------------------------
  255.  
  256.         Function
  257.  
  258.                 Initializes the game port and installs the interrupt
  259.                 handler.
  260.  
  261.  
  262.         Syntax
  263.  
  264.                 #include "gport.h"
  265.                 int GamOpen(void);
  266.  
  267.  
  268.         Remarks
  269.  
  270.                 GamOpen initializes the game port. If an axis is found to
  271.                 be valid, it's corresponding bit is set in the returned
  272.                 status word. After a call to GamOpen, a subsequent call
  273.                 to GamClose is required. Failure to do so will most
  274.                 definitely cause the operating system to crash.
  275.  
  276.  
  277.         Return Value
  278.  
  279.                 GamOpen returns a valid axis status word. The bits/values
  280.                 are defined as follows:
  281.  
  282.                         JAX_VAL  (0x1) - Joystick A, x axis valid
  283.                         JAY_VAL  (0x2) - Joystick A, y axis valid
  284.                         JA_VAL   (0x3) - Joystick A, both axes valid
  285.                         JBX_VAL  (0x4) - Joystick B, x axis valid
  286.                         JBY_VAL  (0x8) - Joystick B, y axis valid
  287.                         JB_VAL   (0xC) - Joystick B, both axes valid
  288.  
  289.  
  290.         See also
  291.  
  292.                 GamClose
  293.  
  294.  
  295.         Example
  296.  
  297.                 Attempt to open the game port and check Joystick A.
  298.  
  299.                 {
  300.                 int valid_axes;
  301.  
  302.                    valid_axes = GamOpen();
  303.                    if((valid_axis & JA_VAL) == JA_VAL)
  304.                    {
  305.                       ...Joystick A OK
  306.  
  307.                    }
  308.                 }
  309.  
  310.                                         5
  311.  
  312.  
  313.  
  314.         ----------------------------------------------------------------
  315.         GamClose
  316.         ----------------------------------------------------------------
  317.  
  318.         Function
  319.  
  320.                 Releases the interrupt handler.
  321.  
  322.  
  323.         Syntax
  324.  
  325.                 #include "gport.h"
  326.                 void GamClose(void);
  327.  
  328.  
  329.         Remarks
  330.  
  331.                 After a call to GamOpen, a subsequent call to GamClose
  332.                 is required. Failure to do so will most definitely cause
  333.                 the operating system to crash.
  334.  
  335.  
  336.         See also
  337.  
  338.                 GamOpen
  339.  
  340.  
  341.         Example
  342.  
  343.                 Close the game port prior to terminating.
  344.  
  345.                 {
  346.  
  347.                   ...closing code
  348.  
  349.                   GamClose();
  350.                   exit(0)
  351.  
  352.                 }
  353.  
  354.  
  355.  
  356.  
  357.         ----------------------------------------------------------------
  358.         GamAxis
  359.         ----------------------------------------------------------------
  360.  
  361.         Function
  362.  
  363.                 Gets the coordinate of a joystick axis.
  364.  
  365.  
  366.         Syntax
  367.  
  368.                 #include "gport.h"
  369.                 signed GamAxis(byte axis);
  370.  
  371.  
  372.                                         6
  373.  
  374.  
  375.  
  376.         Parameters
  377.  
  378.                 axis  - Constant that defines which axis to get the
  379.                         coordinate of. Possibilities are:
  380.  
  381.                            JAX  (0) - Joystick A, X axis
  382.                            JAY  (1) - Joystick A, Y axis
  383.                            JBX  (2) - Joystick B, X axis
  384.                            JBY  (3) - Joystick B, Y axis
  385.  
  386.  
  387.         Remarks
  388.  
  389.                 GamAxis fetches the coordinate of a single joystick
  390.                 axis. The coordinate is returned as a signed integer.
  391.  
  392.  
  393.         Return value
  394.  
  395.                 GamCoord returns the coordinate of the specified axis.
  396.                 The values will range from -1000 to +1000.
  397.  
  398.  
  399.         See also
  400.  
  401.                 GamAxes GamButton
  402.  
  403.  
  404.  
  405.  
  406.         Example
  407.  
  408.                 Update the current positions of the X & Y axes for
  409.                 joystick A.
  410.  
  411.  
  412.                 {
  413.  
  414.                    YourXaxisFunction( GamAxis(JAX) );
  415.                    YourYaxisFunction( GamAxis(JAY) );
  416.                 }
  417.  
  418.  
  419.  
  420.         ----------------------------------------------------------------
  421.         GamAxes
  422.         ----------------------------------------------------------------
  423.  
  424.         Function
  425.  
  426.                 Gets the both axes coordinates of a joystick.
  427.  
  428.  
  429.         Syntax
  430.  
  431.                 #include "gport.h"
  432.                 void GamAxes(byte stick, signed *x, signed *y);
  433.  
  434.                                         7
  435.  
  436.  
  437.  
  438.  
  439.  
  440.         Parameters
  441.  
  442.                 stick - Constant that defines which joystick to get
  443.                         the coordinates of. Possibilities are:
  444.  
  445.                            JA  (0) - Joystick A
  446.                            JB  (1) - Joystick B
  447.  
  448.                     x - pointer to the signed integer where the x axis
  449.                         coordinate will be stored.
  450.  
  451.                     y - pointer to the signed integer where the y axis
  452.                         coordinate will be stored.
  453.  
  454.  
  455.         Remarks
  456.  
  457.                 GamAxes fetches the coordinates of both axes for
  458.                 the specified joystick. The coordinates are stored
  459.                 at the pointers passed to GamAxes. The values will
  460.                 range from -1000 to +1000.
  461.  
  462.  
  463.  
  464.         See also
  465.  
  466.                 GamAxis GamButton
  467.  
  468.  
  469.         Example
  470.  
  471.                 Update the current positions of the X & Y axes for
  472.                 joystick A.
  473.  
  474.  
  475.                 {
  476.                 signed x,y;
  477.  
  478.                    GamAxes(JA, &x, &y);
  479.  
  480.                    YourXaxisFunction( x );
  481.                    YourYaxisFunction( y );
  482.                 }
  483.  
  484.  
  485.  
  486.         ----------------------------------------------------------------
  487.         GamButton
  488.         ----------------------------------------------------------------
  489.  
  490.         Function
  491.  
  492.                 Gets the status of the joystick buttons.
  493.  
  494.  
  495.  
  496.                                         8
  497.  
  498.  
  499.  
  500.         Syntax
  501.  
  502.                 #include "gport.h"
  503.                 byte GamButton(void);
  504.  
  505.  
  506.         Remarks
  507.  
  508.                 GamButton returns the current status of the joystick
  509.                 buttons as well as any button status since the last
  510.                 call to GamButton.
  511.  
  512.  
  513.         Return value
  514.  
  515.                 GamButton returns the status of the joystick buttons.
  516.                 If the button is currently pressed, it's current bit
  517.                 will be set. If a button has been pressed since the
  518.                 last call to GamButton, it's pending bit is set.
  519.                 The bit constants are as follows:
  520.  
  521.                   BA1_CURR (0x01) - Joystick A, button 1 current.
  522.                   BA2_CURR (0x02) - Joystick A, button 2 current.
  523.                   BB1_CURR (0x04) - Joystick B, button 1 current.
  524.                   BB2_CURR (0x08) - Joystick B, button 2 current.
  525.                   BA1_PEND (0x10) - Joystick A, button 1 pending.
  526.                   BA2_PEND (0x20) - Joystick A, button 2 pending.
  527.                   BB1_PEND (0x40) - Joystick B, button 1 pending.
  528.                   BB2_PEND (0x80) - Joystick B, button 2 pending.
  529.  
  530.  
  531.         See also
  532.  
  533.                 GamAxis GamAxes
  534.  
  535.  
  536.         Example
  537.  
  538.                 Check if the player has fired (button 1). If so
  539.                 call the fire update function.
  540.  
  541.                 #define FIRE  (BA1_PEND) | (BA1_CURR)
  542.  
  543.                 {
  544.  
  545.                    if(GamButton() & FIRE)
  546.                    {
  547.                       YourFireFunction();
  548.  
  549.                       ...more code
  550.                    }
  551.  
  552.                 }
  553.  
  554.  
  555.  
  556.  
  557.  
  558.                                         9
  559.  
  560.  
  561.  
  562.  
  563.         Calibration Functions
  564.  
  565.  
  566.         The performance of the joystick can be significantly improved
  567.         by calibrating it, especially if the joystick is misaligned.
  568.         This is achieved by collecting the raw value of the position of
  569.         the joystick extremes; full up, down, left, and right; and
  570.         recalculating scaling math. GamRawAxis() fetches the raw
  571.         value of the position of the joystick, which is passed to the
  572.         function GamCalAxis(). GamCalAxis() then recalculates the
  573.         scaling math.
  574.  
  575.         The calibration is done in two steps in order to leave open
  576.         the option of saving the raw values to disk for future
  577.         reference. This saves the step of having to recalibrate
  578.         every time a program is run.
  579.  
  580.         GamCenter() sets the centering mode. There are two ways to
  581.         determine where the center of a joystick is. The REAL center
  582.         is defined as where the joystick comes to rest. The MEAN
  583.         center is defined as the mean between the joystick extremes.
  584.  
  585.         For a more detailed description on calibration, see Appendix B.
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.                                         10
  621.  
  622.  
  623.  
  624.         ----------------------------------------------------------------
  625.         GamRawAxis
  626.         ----------------------------------------------------------------
  627.  
  628.         Function
  629.  
  630.                 Gets the raw value of a joystick axis.
  631.  
  632.  
  633.         Syntax
  634.  
  635.                 #include "gport.h"
  636.                 unsigned GamRawAxis(byte axis);
  637.  
  638.  
  639.         Parameters
  640.  
  641.                 axis  - Constant that defines which axis to get the
  642.                         coordinate of. Possibilities are:
  643.  
  644.                            JAX  (0) - Joystick A, X axis
  645.                            JAY  (1) - Joystick A, Y axis
  646.                            JBX  (2) - Joystick B, X axis
  647.                            JBY  (3) - Joystick B, Y axis
  648.  
  649.  
  650.         Remarks
  651.  
  652.                 GamRawAxis returns the raw value of a joystick position
  653.                 to be used for calibrating the joystick . Smaller values
  654.                 are to the left and up while larger values are to the
  655.                 right and down. The actual value will vary from machine
  656.                 to machine.
  657.  
  658.  
  659.         Return value
  660.  
  661.                 GamRawAxis returns the raw value for the position of
  662.                 the selected joystick axis.
  663.  
  664.  
  665.         See also
  666.  
  667.                 GamCal GamCenter
  668.  
  669.  
  670.         Example
  671.  
  672.                 Calibrate the X axis on joystick A.
  673.  
  674.                 {
  675.                 int raw_ax_right;
  676.                 int raw_ax_left;
  677.  
  678.  
  679.                    puts("Hold joystick full right and press any key");
  680.                    getch();
  681.  
  682.                                         11
  683.  
  684.  
  685.  
  686.                    raw_ax_right = GamRawAxis(JAX);
  687.                    GamCalAxis(JAX, raw_ax_left);
  688.  
  689.                    puts("Hold joystick full left and press any key");
  690.                    getch();
  691.                    raw_ax_left  = GamRawAxis(JAX);
  692.                    GamCalAxis(JAX, raw_ax_right);
  693.                 }
  694.  
  695.  
  696.  
  697.  
  698.         ----------------------------------------------------------------
  699.         GamCalAxis
  700.         ----------------------------------------------------------------
  701.  
  702.         Function
  703.  
  704.                 Calibrates a joystick axis extreme from a raw value.
  705.  
  706.  
  707.         Syntax
  708.  
  709.                 #include "gport.h"
  710.                 void GamCalAxis(byte axis, unsigned raw_value);
  711.  
  712.  
  713.         Parameters
  714.  
  715.                 axis  - Constant that defines which axis to get the
  716.                         coordinate of. Possibilities are:
  717.  
  718.                            JAX  (0) - Joystick A, X axis
  719.                            JAY  (1) - Joystick A, Y axis
  720.                            JBX  (2) - Joystick B, X axis
  721.                            JBY  (3) - Joystick B, Y axis
  722.  
  723.                 raw_value - Raw value returned from a call to GamRaw
  724.                         on which to calibrate.
  725.  
  726.  
  727.         Remarks
  728.  
  729.                 GamCalAxis calibrates a joystick extreme from a raw
  730.                 value from a previous call to GamRawAxis. Notice that
  731.                 it is not necessary to specify the extreme (left/right
  732.                 or up/down) in question.
  733.  
  734.  
  735.         See also
  736.  
  737.                 GamRawAxis GamCenter
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.                                         12
  745.  
  746.  
  747.  
  748.         Example
  749.  
  750.                 Calibrate the X axis on joystick A.
  751.  
  752.                 {
  753.  
  754.                    puts("Hold joystick full right and press any key");
  755.                    getch();
  756.                    GamCalAxis(JAX, GamRawAxis(JAX));
  757.  
  758.                    puts("Hold joystick full left and press any key");
  759.                    getch();
  760.                    GamCalAxis(JAX, GamRawAxis(JAX));
  761.                 }
  762.  
  763.  
  764.  
  765.         ----------------------------------------------------------------
  766.         GamCenter
  767.         ----------------------------------------------------------------
  768.  
  769.         Function
  770.  
  771.                 Sets the centering mode.
  772.  
  773.  
  774.         Syntax
  775.  
  776.                 #include "gport.h"
  777.                 void GamCenter(byte mode);
  778.  
  779.  
  780.         Parameters
  781.  
  782.                 mode - Constant defining the centering mode to be used.
  783.                        Possibilities are:
  784.  
  785.                        *  REAL (0) - real centering mode.
  786.                           MEAN (1) - mean value centering.
  787.  
  788.                           * default
  789.  
  790.         Remarks
  791.  
  792.                 GamCenter sets the centering mode to be used. In real
  793.                 mode, the center of an axis will be where the joystick
  794.                 is at rest. In mean mode, the center is calculated as
  795.                 the mean between the two previously calibrated extremes.
  796.                 For a more detailed description of the centering
  797.                 modes see Appendix B.
  798.  
  799.  
  800.         See also
  801.  
  802.                 GamRawAxis GamCalAxis
  803.  
  804.  
  805.  
  806.                                         13
  807.  
  808.  
  809.  
  810.         Example
  811.  
  812.                 Set the centering to mean mode.
  813.  
  814.                 {
  815.  
  816.                         GamCenter(MEAN);
  817.  
  818.                 }
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.                                         14
  869.  
  870.  
  871.  
  872.         Appendix A
  873.  
  874.  
  875.         Things to look out for.
  876.  
  877.         ∙ Gport installs a timer interrupt at interrupt 0x1C (user
  878.           timer link). Gport does not take over this interrupt but
  879.           chains into it.
  880.  
  881.         ∙ Some faster machines will exhibit a "fold back" on the down
  882.           and right strokes of the joystick. Special AT game ports
  883.           are available which usually resolve this problem.
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.                                         15
  931.  
  932.  
  933.  
  934.           Appendix B
  935.  
  936.  
  937.         Calibration
  938.  
  939.         When the function GamOpen() is called, some assumptions are made
  940.         about the raw values of the positions of the joystick extremes;
  941.         left, right, up and down. The assumptions are based on the raw
  942.         value of the joystick axes at the time of the call to  GamOpen()
  943.         (at rest at the center). In most cases the joystick will perform
  944.         reasonably well providing the alignment of the joystick is at
  945.         least fair.
  946.  
  947.         The performance of the joystick can be greatly improved if it
  948.         is calibrated. Even a poorly aligned joystick can be made to
  949.         appear to perform quite well. In order to accomplish this the
  950.         assumptions about the joystick extremes must be replaced by
  951.         their actual raw values. This requires the cooperation of the
  952.         user as well as the functions GamRawAxis() and GamCalAxis().
  953.  
  954.         Typically the user will be prompted to hold the joystick to
  955.         each of the four extremes and hit a key on the keyboard. For
  956.         each extreme, the raw value of the joystick position is read
  957.         by a call to GamRawAxis() and the returned value is passes to
  958.         GamCalAxis(). GamCalAxis will then make some recalculations
  959.         and replace the previous assumptions (or calibration).
  960.  
  961.         Notice that the calibration is done in two steps. First the
  962.         raw value is fetched and then it is passed. This allows the
  963.         program to store the raw values for future reference. Next
  964.         time the program is run, the values can be retrieved and
  965.         passes directly to GamCalAxis(). This saves the step of
  966.         having to interface with the user and calling GamRawAxis()
  967.         every time the program runs.
  968.  
  969.  
  970.  
  971.  
  972.         Centering
  973.  
  974.         There are two ways to interpret where the center of the
  975.         joystick is . One way is to define the center as being where
  976.         the joystick comes to rest. Gport port refers to this as REAL
  977.         mode. The second way is to define the center as being
  978.         equidistant, or at the mean, from all of the joystick extremes.
  979.         Gport refers to this centering mode as MEAN mode.
  980.  
  981.         REAL mode has the obvious advantage that the joystick will
  982.         always return approximately to the center. This will preclude
  983.         any drifting. The disadvantage of REAL mode is that there is
  984.         no evidence of how well the joystick is actually aligned.
  985.  
  986.         The advantage and disadvantage of MEAN mode is the complement
  987.         of those of REAL mode. Drift will occur if the joystick is
  988.         not aligned well. But since there will be the evidence of
  989.         the joystick's misalignment, MEAN mode could be used to
  990.         actually align a joystick.
  991.  
  992.                                         16
  993.  
  994.  
  995.  
  996.  
  997.         Recall that MEAN mode refers to the joystick extremes. Also
  998.         recall that the joystick extremes are assumed until the
  999.         joystick is calibrated. For this reason there is little
  1000.         difference between the two centering modes until the joystick
  1001.         is calibrated. Calculating the mean center using the assumed
  1002.         extremes will result in the same center since the reverse
  1003.         process is used to calculate the assumed extremes.
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.                                         17
  1055.  
  1056.  
  1057.  
  1058.       Appendix C
  1059.  
  1060.  
  1061.         Gport Registration Form
  1062.  
  1063.         Name: ______________________________________________________
  1064.  
  1065.         Company: ___________________________________________________
  1066.  
  1067.         Address: ___________________________________________________
  1068.  
  1069.         City: ____________________________  State: _________________
  1070.  
  1071.         Zip code: _________________  Phone # : _____________________
  1072.  
  1073.         CompuServe # : _____________________________________________
  1074.  
  1075.         How did you acquire Gport ? _________________________________
  1076.  
  1077.         ____________________________________________________________
  1078.  
  1079.         What functions do you find most useful ?____________________
  1080.  
  1081.         ____________________________________________________________
  1082.  
  1083.         What functions do you find least useful ?___________________
  1084.  
  1085.         ____________________________________________________________
  1086.  
  1087.         What functions, not in Gport, would you like to see ?_______
  1088.  
  1089.         ____________________________________________________________
  1090.  
  1091.         What other types of libraries would you find useful ?_______
  1092.  
  1093.         __ Serial Communications  __ Expanded Memory  __ IEEE/GPIB
  1094.  
  1095.         Others: ____________________________________________________
  1096.  
  1097.         registration                                      $ 15.00
  1098.  
  1099.         California residents add sales tax (  8.25% )     $________
  1100.  
  1101.         shipping inside continental U.S.   ( $ 2.00 )
  1102.         shipping outside continental U.S.  ( $ 5.00 )     $________
  1103.  
  1104.  
  1105.                                                  Total:   $________
  1106.  
  1107.         All Payments Must be in U.S. Dollars
  1108.  
  1109.         Make check or money order payable to:    Bri Productions
  1110.                                                  P.O. Box 7121
  1111.                                                  Fremont, CA 94537-7121
  1112.  
  1113.  
  1114.  
  1115.  
  1116.                                         18
  1117.